#include <iostream>
#include <string>
#include <vector>
#include <cctype>
using namespace std;
void practice_5_3();
void practice_5_5();
void practice_5_6();
void practice_5_7();
void example_p161();
void practice_5_9();
void practice_5_12();
void practice_5_14();
void practice_5_17();
void practice_5_18();
void practice_5_19();
void practice_5_20();
void practice_5_22();
struct Tuble
{
	string word;
	unsigned cnt;
};
int main()
{
	//practice_5_3();
	//practice_5_5();
	//practice_5_6();
	//practice_5_7();
	//example_p161();
	//practice_5_9();
	//practice_5_12();
	//practice_5_14();
	//practice_5_17();
	//practice_5_18();
	//practice_5_19();
	//practice_5_20();
	practice_5_22();
	return 0;
}
void practice_5_3()
{
	unsigned sum=0,val=0;
	while(sum+=val,++val,val<=10);
	cout <<sum<<endl;
}
void practice_5_4a()
{
	string s("hello world");
	//while(string::iterator iter!=s.end()){}
}
void practice_5_5()
{
	vector<string> scores={"F","D","C","B","A","A++"};
	unsigned grade=0;
	string letterscore;
	cin>>grade;
	if(grade<60)
		letterscore=scores[0];
	else 
		letterscore=scores[(grade-50)/10];
	cout<<letterscore<<endl;

}
void practice_5_6()
{
	vector<string> scores={"F","D","C","B","A","A++"};
	unsigned grade=0;
	string letterscore;
	cin>>grade;
	letterscore=(grade<60)?scores[0]:scores[(grade-50)/10];
	cout<<letterscore;
}
void practice_5_7()
{
	int ival1=2,ival2=2;
	if(ival1!=ival2)
		ival1=ival2;
	else
		ival1=ival2=0;
	cout<<ival1<<" "<<ival2;
}
void example_p161()
{
	int ival;
	cin>>ival;
	switch(ival){
		case 1:
			int jval;
			cout<<1<<endl;
			break;
		case 2:
			jval=4;
			cout<<2<<endl;
			break;
		default:
			cout<<ival+2<<endl;
			break;
	}
}
void practice_5_9()
{
	unsigned vowelCnt=0,tabCnt=0,lineCnt=0,blankCnt=0;
	string text("adfqwoUIO \n \t SFONFADQOajoqf");
	//cin>>text;
	for(const auto &c:text)
	{
		if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='A'||c=='E'||c=='I'||c=='O'||c=='U')
			++vowelCnt;
		switch(c){
			case ' ':
				++blankCnt;
				break;
			case '\n':
				++lineCnt;
				break;
			case '\t':
				++tabCnt;
				break;
			default:
				break;
		}
	}
	cout<<vowelCnt<<" "<<tabCnt<<" "<<lineCnt<<" "<<blankCnt;
}
void practice_5_12()
{
	unsigned ffCnt=0,flCnt=0,fiCnt=0;
	string text("asffadfiflffflfiffafif");
	for(auto beg=text.cbegin();beg!=text.cend();++beg)
	{
		if(*beg=='f')
		{
			if((beg+1)!=text.cend()){
				const auto &c=*(beg+1);
				switch(c){
					case 'f':
						++ffCnt;
						break;
					case 'l':
						++flCnt;
						break;
					case 'i':
						++fiCnt;
						break;
					default:
						break;
				}
			}
		}
	}
	cout<<ffCnt<<" "<<flCnt<<" "<<fiCnt;
}
void practice_5_13()
{
	constexpr unsigned ival=512,jval=1024,kval=4096;
	unsigned bufsize;
	unsigned swt;
	cin>>swt;
	switch(swt){
		case ival:
			bufsize=ival*sizeof(int);
			break;
		case jval:
			bufsize=jval*sizeof(int);
			break;
	}
}
void practice_5_14()
{
	string input;
	vector<string> v;
	Tuble t1{};
	while(cin>>input)
		v.push_back(input);
	for(vector<string>::size_type i=0;i<v.size();)
	{
		unsigned tmpCnt=1;
		string tmpWord=v[i];
		vector<string>::size_type j=i+1;
		while(j<v.size())
		{
			if(tmpWord==v[j]){
				++tmpCnt;
				++j;
			}
			else
				break;
		}
		if(tmpCnt>=t1.cnt)
		{
			t1.cnt=tmpCnt;
			t1.word=tmpWord;
		}
		if(j!=v.size())
			i=j;
		else
			break;
	}
	cout<<t1.word<<" "<<t1.cnt;
}
void practice_5_17()
{
	vector<int> v1{0,1,1,4};
	vector<int> v2{0,1,1,2,3,5,8};
	vector<int> &small=(v1.size()<v2.size())?v1:v2;
	vector<int> &large=(v1.size()>v2.size())?v1:v2;
	vector<int>::size_type i=0;
	for(;(i!=small.size())&&(small[i]==large[i]);++i);
	if(i<small.size())
		cout<<"false"<<endl;
	else
		cout<<"true"<<endl;
}
void practice_5_19()
{
	do{
		string s1,s2;
		cout<<"please enter two strings :";
		if(cin>>s1>>s2)
			cout<<"the short one is: "<<((s1.size()<s2.size())?s1:s2)<<endl;
	}
	while (cin);
}
void practice_5_20()
{
	string word,history;
	while(cin>>word){
		if(word==history)
		{
			if(!isupper(word[0]))
				continue;
			cout<<"repeat word:"<<word<<endl;
			break;
		}
		history=word;
	}
}
void practice_5_22()
{
	int sz=0;
	while(sz<=0){
		cin>>sz;
	}
}